package com.kaibes.platform.member.api;

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.kaibes.platform.member.db.Member;
import com.kaibes.platform.member.db.MemberService;
import com.kaibes.platform.member.pojo.MemberUpdate;
import com.kaibes.web.api.ApiLink;
import com.kaibes.web.api.ResponseApi;

@RestController
@RequestMapping("/members/infos")
public class MemberApi extends ResponseApi<Member, MemberService>{
    
    @PutMapping("/{id:\\d+}")
    @ApiLink("修改等级会员类型，根据id")
    public ResponseEntity<Object> putById(@PathVariable Integer id, @RequestBody MemberUpdate member) {
        return super.putById(member, id, "修改会员成功", "修改会员失败");
    }
    
}
